import { Controller, Get, Param, UseFilters } from '@nestjs/common';
import { WorkFilter } from '../filter/workexception.filter';
import { WorkService } from '../service/work.service';

@Controller('work')
  @UseFilters(WorkFilter) // 在方法级别应用过滤器
export class WorkController {
  constructor(private readonly workService: WorkService) {}

  @Get(':id')

  getUserById(@Param('id') id: string) {
    return this.workService.getUserById(id);
  }
}